package org.dtrd.modules.service.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.service.entity.po.DtrdEntRdServiceCategory;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 服务套餐分类信息
 * </p>
 *
 * @author QR
 * @since 2021-11-19 18:52:54
 */
@Getter
@Setter
@ApiModel(value = "服务套餐分类数据对象")
public class ServiceCategoryInfo {

    private Integer dataId;

    @NotNull
    @ApiModelProperty(value = "分类名称", required = true)
    private String categoryName;

    @NotNull
    @ApiModelProperty(value = "分类图片链接", required = true)
    private String categoryImg;

    @ApiModelProperty("分类描述")
    private String categoryDesc;

    @NotNull
    @ApiModelProperty(value = "编码机构", required = true)
    private String orgCode;


    public ServiceCategoryInfo parseFromPo(DtrdEntRdServiceCategory po) {
        dataId = po.getDataId();
        categoryName = po.getCategoryName();
        categoryImg = po.getCategoryImg();
        categoryDesc = po.getCategoryDesc();
        orgCode = po.getOrgCode();
        return this;
    }


}
